package core.router;

public class Packet {
	
	private double size;
	private String tipo;
	private double arrivingTime;
	private double leftTime;

	public Packet(double size, String tipo){
		this.size = size;
		this.tipo = tipo;
	}
	
	public double getArrivingTime() {
		return arrivingTime;
	}

	public void setArrivingTime(double arrivingTime) {
		this.arrivingTime = arrivingTime;
	}

	public double getLeftTime() {
		return leftTime;
	}

	public void setLeftTime(double leftTime) {
		this.leftTime = leftTime;
	}
	
	public double getQueueTime(){
		return leftTime - arrivingTime;
	}

	public double getSize() {
		return size;
	}

	public void setSize(double size) {
		this.size = size;
	}

	public void setTipo(String tipo) {
		this.tipo = tipo;
	}

	public String getTipo() {
		return tipo;
	}
	
	public String toString(){
		return "<Packet> size: " + getSize() + " " + getTipo();
	}
	
}
